﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace KWT.DRG_DIP.API.Migrations
{
    /// <inheritdoc />
    public partial class _20250509143800 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "FildDesc",
                table: "qc_Rules_Fields");

            migrationBuilder.AddColumn<string>(
                name: "ValueType",
                table: "qc_Rules_ValueRangeInfo",
                type: "varchar(256)",
                maxLength: 256,
                nullable: false,
                defaultValue: "",
                comment: "数值类型")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "FildType",
                table: "qc_Rules_Fields",
                type: "varchar(256)",
                maxLength: 256,
                nullable: false,
                defaultValue: "",
                comment: "字段类型：数值、字符串、List、诊断编码、手术编码（后续可能会增加）")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ValueType",
                table: "qc_Rules_ValueRangeInfo");

            migrationBuilder.DropColumn(
                name: "FildType",
                table: "qc_Rules_Fields");

            migrationBuilder.AddColumn<string>(
                name: "FildDesc",
                table: "qc_Rules_Fields",
                type: "varchar(256)",
                maxLength: 256,
                nullable: false,
                defaultValue: "",
                comment: "字段注释")
                .Annotation("MySql:CharSet", "utf8mb4");
        }
    }
}
